commonlibsse_ng\re\b/
BGSDirectionalAmbientLightingColors.rs

1use crate::re::Color::Color;
2
3/// Represents a min-max range of values.
4#[repr(C)]
5#[derive(Debug, Clone, Copy, PartialEq, Eq)]
6pub struct MaxMin<T> {
7    pub max: T, // 0x0
8    pub min: T, // variadic
9}
10const _: () = assert!(size_of::<MaxMin<Color>>() == 0x8);
11
12impl<T> MaxMin<T> {
13    /// Creates a new `MaxMin` with specified `max` and `min` values.
14    #[inline]
15    pub const fn new(max: T, min: T) -> Self {
16        Self { max, min }
17    }
18}
19
20/// Represents the directional ambient lighting colors.
21#[repr(C)]
22#[derive(Debug, Clone, Copy, PartialEq, Eq)]
23pub struct Directional {
24    pub x: MaxMin<Color>, // 00
25    pub y: MaxMin<Color>, // 08
26    pub z: MaxMin<Color>, // 10
27}
28const _: () = assert!(size_of::<Directional>() == 0x18);
29
30/// Represents the ambient lighting colors with specular and fresnel power.
31#[repr(C)]
32#[derive(Debug, Clone, Copy, PartialEq)]
33pub struct BGSDirectionalAmbientLightingColors {
34    pub directional: Directional, // 00
35    pub specular: Color,          // 18
36    pub fresnel_power: f32,       // 1C
37}
38const _: () = assert!(size_of::<BGSDirectionalAmbientLightingColors>() == 0x20);